<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Advanced Event and Signal Handling</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="GTK+ 2.0 Tutorial"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="Idle Functions"
HREF="x1792.html"><LINK
REL="NEXT"
TITLE="Signal Emission and Propagation"
HREF="x1812.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GTK+ 2.0 Tutorial</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1792.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1812.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="CH-ADVANCEDEVENTSANDSIGNALS"
></A
>Advanced Event and Signal Handling</H1
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="SEC-SIGNALFUNCTIONS"
>Signal Functions</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1803"
>Connecting and Disconnecting Signal Handlers</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>gulong g_signal_connect( GObject     *object,
                         const gchar *name,
                         GCallback    func,
                         gpointer     func_data );

gulong g_signal_connect_after( GObject       *object,
                               const gchar   *name,
                               GCallback      func,
                               gpointer       func_data );

gulong g_signal_connect_swapped( GObject       *object,
                                 const gchar   *name,
                                 GCallback      func,
                                 GObject       *slot_object );

void g_signal_handler_disconnect( GObject *object,
                                  gulong   handler_id );

void g_signal_handlers_disconnect_by_func( GObject   *object,
                                           GCallback  func,
                                           gpointer   data );</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1806"
>Blocking and Unblocking Signal Handlers</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void g_signal_handler_block( GObject *object,
                             gulong   handler_id);

void g_signal_handlers_block_by_func( GObject   *object,
                                      GCallback  func,
                                      gpointer   data );

void g_signal_handler_unblock( GObject *object,
                               gulong   handler_id );

void g_signal_handler_unblock_by_func( GObject   *object,
                                       GCallback  func,
                                       gpointer   data );</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1809"
>Emitting and Stopping Signals</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void g_signal_emit( GObject *object,
                    guint      signal_id,
                    ... );

void g_signal_emit_by_name( GObject     *object,
                            const gchar *name,
                            ... );

void g_signal_emitv( const GValue *instance_and_params,
                     guint         signal_id,
                     GQuark        detail,
                     GValue       *return_value );

void g_signal_stop_emission( GObject *object,
                             guint    signal_id,
                             GQuark   detail );

void g_signal_stop_emission_by_name( GObject   *object,
                                     const gchar *detailed_signal );</PRE
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1792.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1812.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Idle Functions</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Signal Emission and Propagation</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>